package com.jt.demo9;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource(value = "classpath:/dept.properties",encoding="utf-8")
public class Dept1 {
    @Value("${dept.a}")
    private Integer a;
    @Value("${dept.b}")
    private String b;
    public void run(){
        System.out.println(a+" "+b);
    }
}
